package com.timoon.page;

import java.util.ArrayList;
import java.util.List;

import org.apache.wicket.markup.html.WebPage;
import org.apache.wicket.markup.html.list.ListItem;
import org.apache.wicket.markup.html.list.PageableListView;
import org.apache.wicket.markup.html.navigation.paging.PagingNavigation;
import org.apache.wicket.markup.html.navigation.paging.PagingNavigator;

import com.timoon.sample.dao.model.Role;

public class TestPage extends WebPage {
	
	public TestPage() {
		// TODO Auto-generated constructor stub
		
		List<Role> roles=new ArrayList<>();
		
		for(int i=0;i<23;i++){
			roles.add(new Role());
		}
		
		PageableListView listView=new PageableListView("wk_list",roles,10) {

			@Override
			protected void populateItem(ListItem arg0) {
				// TODO Auto-generated method stub
				
			}
		};
		add(listView);
		
		add(new PagingNavigator("wk_page", listView));
	}

}
